import './assets/tailwindcss.css';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';

import App from './App.vue';
import router from './router';

import './assets/main.css';
import pic from '@assets/pics/622.jpg';
import { job } from '@assets/json/data.json';
import 'virtual:svg-icons-register';
import SvgIcon from './components/SvgIcon.vue';

console.log(pic);

const app = createApp(App);

app.use(createPinia());
app.use(router);
app.use(ElementPlus);
app.component('svg-icon', SvgIcon);

app.directive('color', (el, binding) => {
  // 这会在 `mounted` 和 `updated` 时都调用
  console.log('directive: ', binding);
  if (binding.value === false) {
    el.parentNode.removeChild(el);
  } else {
    el.parentNode.appendChild(el);
  }
});

app.mount('#app');
